function ajax(url, vars, callbackFunction){
  var request = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0");
  request.open("GET", url, true); 
  request.onreadystatechange = function(){
    if (request.readyState == 4 && request.status == 200){
      if (request.responseText){         
          callbackFunction(request.responseText);
      }
    }
  };
  request.send(vars);
}

var preinfo = new Array();
function doinfo(str){
  if (str != null && str != ""){        
    infodata = str.split("|");      
    
    for(i=0;i<=17;i++){
      if (i==2) continue;
      if (preinfo[i] == null) preinfo[i] = infodata[i];
      if (preinfo[i] != infodata[i]){
        eval("agamt"+(i+1)).innerHTML = "<font size=3 style=\"color:#0000ff\">"+infodata[i]+"</font>";
        preinfo[i] = infodata[i];
      }else{
        eval("agamt"+(i+1)).innerHTML = infodata[i];
      }
    }   
  }
}

function info(){
  ajax("info.php?time="+(new Date().getTime()),"",doinfo);
}

function sum_info(){        
    info();    
    setInterval("info()",10000);
}  

function sum_info_t(intervaltime){
    if(intervaltime>0){
        alert(intervaltime);
    }else{
        intervaltime=10000
    }
    info();    
    setInterval("info()",10000);
}

function covermenu(){
  overlaymenu.style.visibility="visible";
}
function coverOutmenu(){
  overlaymenu.style.visibility="hidden";
}